home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / C64 / D-Demos / (c)d3.d64 / sprites (.txt) < prev   
Commodore BASIC  |  2007-02-04  |  6KB  |  162 lines

  1. 10 SP$="[149]                                 "
  2. 20 S=53248:V=54272:POKE53281,0:POKE53280,5
  3. 24 FORI=0TO28:POKEV+I,0:NEXT
  4. 25 R$="[169]                   ":POKES+27,0
  5. 30 PRINT"[147]":POKEV+24,15:POKES+28,0
  6. 35 FORI=1TO3:PRINTTAB(12-I)LEFT$(R$,20-(6-I*2))"[223]":NEXT
  7. 40 FORI=1TO2:PRINTTAB(9)LEFT$(SP$,21):NEXT
  8. 45 FORI=1TO4:PRINTTAB(9)LEFT$(SP$,5)TAB(15)LEFT$(SP$,4)TAB(20)LEFT$(SP$,4);
  9. 46 PRINTTAB(25)LEFT$(SP$,5):NEXT
  10. 50 FORI=1TO4:PRINTTAB(9)LEFT$(SP$,21):NEXT
  11. 60 FORI=1TO3:READX,Y,SN:POKES+SN*2,X:POKES+SN*2+1,Y:NEXT
  12. 70 DATA121,88,0,160,88,3,201,88,4,1,0,7,3,12,4
  13. 75 FORI=1TO3:READC,SN:POKES+39+SN,C:NEXT
  14. 76 POKE2040,192:POKE2043,196:POKE2044,195
  15. 80 POKES+23,25:POKES+29,0
  16. 85 PRINT""TAB(11)"SPRITE GRAPHICS"
  17. 86 POKES+21,1:POKEV+4,0:POKEV+5,12:POKEV+1,20:POKEV+4,17
  18. 90 PRINT"THE SPRITE GRAPHICS ON THE COMMODORE 64"
  19. 95 FORI=1TO4000:NEXT
  20. 100 PRINT" ARE BETTER THAN ANY OFFERED BY OTHER"
  21. 110 PRINT"COMPUTERS"
  22. 115 POKES+21,9:POKEV+4,0:POKEV+5,12:POKEV+1,30:POKEV+4,17:FORI=1TO4000:NEXT
  23. 120 PRINT"   AND THAT COMES STRAIGHT FROM THE"
  24. 121 PRINT"HORSES MOUTH"
  25. 125 POKES+21,25:POKEV+4,0:POKEV+5,12:POKEV+1,40:POKEV+4,17:FORI=1TO2000:NEXT
  26. 130 A(1,0)=1:A(2,0)=1:A(3,0)=-1
  27. 134 A(1,1)=193:A(2,1)=196:A(3,1)=195
  28. 135 FORI=1TO75:FORJ=1TO3
  29. 140 IFA(J,1)=192ORA(J,1)=198THENA(J,0)=-A(J,0)
  30. 145 A(J,1)=A(J,1)+A(J,0):NEXT
  31. 150 POKE2040,A(1,1):POKE2043,A(2,1):POKE2044,A(3,1):NEXT:POKES+21,0:PRINT"[147]"
  32. 160 PRINT" THESE ARE THE MAIN FEATURES OF SPRITES"
  33. 165 PRINT" [183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183]"
  34. 166 FORI=1TO3000:NEXT
  35. 170 CD$="":POKES+23,0
  36. 175 POKES+29,0:POKES+28,1:POKES+37,2:POKES+38,5:POKES+39,1:POKES+1,80
  37. 180 P$="EXPANSION IN THE X DIRECTION":PRINTLEFT$(CD$,5):GOSUB570:POKES+29,1
  38. 182 FORI=1TO255:POKEV+1,30+(IAND15):NEXT
  39. 184 FORI=250TO1STEP-1:POKES,I:POKEV+1,IAND(15):NEXT:POKES+29,0
  40. 186 POKES+1,98
  41. 190 FORI=1TO100:NEXT
  42. 195 PRINTLEFT$(CD$,7):P$="EXPANSION IN THE Y DIRECTION":POKEV+6,0:GOSUB570
  43. 196 POKES+23,1:FORI=1TO255:POKEV+1,30+(IAND15):NEXT
  44. 197 FORI=250TO1STEP-1:POKES,I:POKEV+1,IAND(15):NEXT:POKES+23,0
  45. 200 FORI=1TO100:NEXT:POKES+29,0:POKES+1,116
  46. 205 PRINTLEFT$(CD$,9):P$="EXPANSION IN BOTH DIRECTIONS":POKEV+6,0:GOSUB570
  47. 206 POKES+23,1:POKES+29,1:FORI=1TO255:POKEV+1,30+(IAND15):NEXT
  48. 210 FORI=250TO1STEP-1:POKES,I:POKEV+1,IAND(15):NEXT:POKES+23,0:POKES+29,0
  49. 215 POKEV+6,0
  50. 220 FORI=1TO2000:NEXT:PRINT"SPRITES CAN PASS OVER TEXT":POKES+1,138
  51. 224 POKEV+4,0:POKEV+6,240:POKEV+4,17
  52. 225 FORI=1TO250:POKES,I:POKEV+1,I:NEXT
  53. 226 POKEV+6,0
  54. 227 POKEV+4,0:POKEV+6,240:POKEV+4,17
  55. 228 FORI=250TO1STEP-1:POKES,I:POKEV+1,I:NEXT
  56. 229 POKEV+4,0:POKEV+6,0
  57. 230 PRINT"OR UNDER IT":POKES+27,1
  58. 234 POKEV+4,0:POKEV+6,240:POKEV+4,17
  59. 235 FORI=1TO250:POKES,I:POKEV+1,I:NEXT
  60. 236 POKEV+6,0
  61. 237 POKEV+4,0:POKEV+6,240:POKEV+4,17
  62. 238 FORI=250TO1STEP-1:POKES,I:POKEV+1,I:NEXT
  63. 239 POKEV+4,0:POKEV+6,0
  64. 240 PRINT"WITH FULL COLLISION DETECTION BETWEEN"
  65. 245 PRINT"SPRITES AND SCREEN DATA"
  66. 246 FORI=1TO3000:NEXT
  67. 250 POKES+1,80:POKES,254:Y=80
  68. 255 T=PEEK(S+31)
  69. 260 Y=Y+1:POKES+1,Y:IFPEEK(S+31)<>0THEN270
  70. 265 POKEV+4,0:POKEV+1,5:POKEV+4,33:FORJ=1TO40:NEXT
  71. 266 POKEV+4,0:POKEV+1,90:POKEV+4,33:FORJ=1TO40:NEXT
  72. 267 GOTO260
  73. 270 FORI=1TO20:POKES+37,15*RND(1):POKES+38,15*RND(1):POKES+39,15*RND(1):NEXT
  74. 274 POKEV+1,10:POKES+37,2:POKES+38,7:POKES+39,1
  75. 275 POKEV+4,0:POKEV+4,129
  76. 280 FORI=202TO209:POKE2040,I:FORJ=1TO90:NEXT:NEXT
  77. 285 POKES+23,1:POKES+29,1:POKES,242:POKES+1,PEEK(S+1)-9
  78. 286 POKEV+4,0:POKEV+4,129
  79. 290 FORI=202TO209:POKE2040,I:FORJ=1TO90:NEXT:NEXT
  80. 291 POKEV+4,0:POKEV+4,129
  81. 292 FORI=202TO209:POKE2040,I:FORJ=1TO70:NEXT:NEXT
  82. 293 POKEV+4,0:POKEV+4,129
  83. 294 FORI=202TO209:POKE2040,I:FORJ=1TO50:NEXT:NEXT
  84. 295 POKEV+4,0:POKEV+4,129
  85. 296 FORI=202TO209:POKE2040,I:FORJ=1TO5:POKES+39,15*RND(1):NEXT:NEXT
  86. 298 FORI=202TO209:POKE2040,I:FORJ=1TO5:POKES+39,15*RND(1):NEXT:NEXT:POKES+21,0
  87. 300 FORI=1TO2000:NEXT:PRINT"[147]"
  88. 305 PRINT"AS WELL AS BEING MULTICOLOR....":FORI=1TO3000:NEXT
  89. 310 POKES+23,0:POKES+29,0:POKE2040,199:POKES,30:POKES+1,56:POKES+21,1
  90. 315 POKES+37,5:POKES+38,2:POKES+39,1
  91. 320 FORI=1TO15:POKES+23,1:PRINT"LIKE ME !"
  92. 321 POKEV+4,0:POKEV+1,10:POKEV+5,7:POKEV+4,129
  93. 325 FORK=1TO150:NEXT:POKES+23,0:PRINT"LIKE ME !"
  94. 330 FORK=1TO150:NEXT:NEXT
  95. 335 PRINT"         "
  96. 340 PRINT"   SPRITES CAN ALSO BE ANY ONE OF 16"
  97. 345 PRINT"          DIFFERENT COLORS.":FORI=1TO2000:NEXT
  98. 350 POKE2041,210:POKES+23,2:POKES+29,2:POKES+40,0:POKES+21,3:POKES+2,145
  99. 355 POKES+3,140:FORI=1TO15:POKES+40,I:FORJ=1TO100:NEXT:NEXT
  100. 356 FORI=210TO218:POKE2041,I:FORH=1TO50:NEXT:NEXT
  101. 360 PRINT"ISN'T IT ABOUT TIME THAT YOU BOUGHT"
  102. 365 PRINT" A COMMODORE 64 "
  103. 370 FORI=1TO4000:NEXT:POKES+21,0
  104. 375 PRINT"[147]UP TO EIGHT SPRITES CAN BE DISPLAYED"
  105. 380 PRINT"ON THE SCREEN AT A TIME......"
  106. 385 FORI=0TO7:POKE2040+I,199:POKES+I*2,160:POKES+1+I*2,140:POKES+39+I,I+1
  107. 390 READX(I),Y(I):NEXT:POKES+23,0:POKES+29,0:POKES+28,255
  108. 395 DATA1,-1,1,0,1,1,0,1,-1,1,-1,0,-1,-1,0,-1
  109. 396 POKES+21,255
  110. 400 FORI=1TO3000:NEXT:FORJ=1TO50:FORI=0TO7:POKES+I*2,PEEK(S+I*2)+X(I)
  111. 405 POKEV+4,0:POKEV+1,J:POKEV+4,33
  112. 410 POKES+1+I*2,PEEK(S+1+I*2)+Y(I):NEXT:POKEV+4,0:POKEV+1,70:POKEV+4,17:NEXT
  113. 415 FORI=0TO7:X(I)=X(I)*4:Y(I)=Y(I)*4:X(I)=-X(I):Y(I)=-Y(I):NEXT:D=PEEK(S+30)
  114. 420 FORI=1TO2000:NEXT
  115. 430 FORI=0TO7:POKES+I*2,PEEK(S+I*2)+X(I)
  116. 435 POKEV+4,0:POKEV+1,J:POKEV+4,33
  117. 440 POKES+1+I*2,PEEK(S+1+I*2)+Y(I):NEXT:POKEV+4,0:POKEV+1,70:POKEV+4,17
  118. 445 IFPEEK(S+30)<>255THEN430
  119. 446 POKEV+4,0:POKEV+1,10:POKEV+5,12:POKEV+4,129
  120. 450 FORI=202TO209:FORJ=0TO7:POKE2040+J,I:NEXT:NEXT:POKES+21,0
  121. 455 PRINT"WITH FULL COLLISION DETECTION BETWEEN"
  122. 460 PRINT"EACH INDIVIDUAL SPRITE"
  123. 470 GOTO610
  124. 530 PRINTLEFT$(CD$,15)TAB(10)"                    "
  125. 540 PRINTLEFT$(CD$,15)TAB(20-LEN(P$)/2)P$:RETURN
  126. 560 END
  127. 570 POKEV+4,0:POKEV+6,240:POKEV+4,17
  128. 580 POKES+21,1:FORI=1TO250STEP3.5:POKES,I:POKE2040,199+(IAND3)
  129. 585 PRINTLEFT$(P$,(LEN(P$)/250)*I+1)"[145]"
  130. 590 POKEV+1,30+(IAND7):NEXT
  131. 600 RETURN
  132. 610 FORI=1TO4000:NEXT:PRINT"[147][150]"TAB(17)"SOUND":POKE53281,1
  133. 615 PRINT" THE SOUND OUTPUT OF THE COMMODORE 64"
  134. 620 PRINT" IS UNPARALLELED BY ANY OTHER COMPUTER"
  135. 625 FORI=1TO4000:NEXT:PRINT" THERE ARE THREE TOTALLY INDEPENDENT"
  136. 630 PRINT" VOICES AND CONTROL IS PROVIDED OVER:-":FORI=1TO4000:NEXT
  137. 635 P$="WAVEFORM":GOSUB530
  138. 640 FORI=1TO2000:NEXT:POKEV+4,0:POKEV,20:POKEV+1,15:POKEV+5,12
  139. 645 PRINTTAB(16)"TRIANGLE":POKEV+4,17
  140. 650 FORI=1TO2000:NEXT:POKEV+4,0:POKEV,20:POKEV+1,15:POKEV+5,12
  141. 655 PRINTTAB(16)"[145]SAWTOOTH":POKEV+4,33
  142. 660 FORI=1TO2000:NEXT:POKEV+4,0:POKEV,20:POKEV+1,15:POKEV+5,12:POKEV+2,255
  143. 665 PRINTTAB(16)"[145] PULSE  ":POKEV+4,65
  144. 670 FORI=1TO2000:NEXT:POKEV+4,0:POKEV,20:POKEV+1,15:POKEV+5,12:POKEV+2,255
  145. 675 PRINTTAB(16)"[145] NOISE  ":POKEV+4,129
  146. 680 FORI=1TO2000:NEXT
  147. 685 PRINTTAB(16)"[145]        "
  148. 686 P$="FREQUENCY":GOSUB530
  149. 688 FORI=0TO250STEP5
  150. 690 POKEV+4,0:POKEV,20:POKEV+1,I:POKEV+5,12:POKEV+4,17
  151. 700 IFI=70THENPRINTTAB(10)"* ATTACK/DECAY"
  152. 705 IFI=140THENPRINTTAB(10)"* SUSTAIN/RELEASE"
  153. 710 IFI=200THENPRINTTAB(10)"* THREE PROGRAMMABLE FILTERS"
  154. 715 FORJ=1TO130:NEXT:NEXT
  155. 720 FORI=1TO200:NEXT:PRINT"[147]"TAB(12)"THE COMMODORE 64"
  156. 725 PRINTTAB(7)"MUSICIAN OF THE YEAR AWARD":POKES+28,0
  157. 730 POKEV+24,15:POKE780,8:SYS7*4096
  158. 740 IFPEEK(788)<>49THEN740
  159. 750 PRINT"[147]LOAD"CHR$(34)"BOOT.UK1"CHR$(34)",8"
  160. 755 POKE631,13:POKE632,ASC("R"):POKE633,ASC("[213]"):POKE634,13:POKE198,4
  161. 760 PRINT"";:NEW
  162.